package com.tianji.learning.controller;


import com.tianji.common.domain.dto.PageDTO;
import com.tianji.learning.domain.query.ReplyPageQuery;
import com.tianji.learning.domain.vo.ReplyVO;
import com.tianji.learning.service.IInteractionReplyService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * 互动问题的回答或评论 前端控制器
 * </p>
 *
 * @author 
 * @since 2024-12-19
 */
@RestController
@RequestMapping("/admin/replies")
public class InteractionAdminReplyController {

    @Autowired
    private IInteractionReplyService replyService;


    /**
     * 管理端分页查询回答或评论列表
     * @param query
     * @return
     */
    @ApiOperation("分页查询回答或评论列表")
    @GetMapping("/page")
    public PageDTO<ReplyVO> replyPage(ReplyPageQuery query) {
        return replyService.replyPageAdmin(query);
    }



    @ApiOperation("/{id}/hidden/{hidden}")
    @GetMapping("管理端显示或隐藏评论")
    public void isHidden(@PathVariable Long id,@PathVariable  Boolean hidden) {
         replyService.isHidden(id,hidden);
    }

}
